package com.ten.jinxiancun.server.impl;


import com.ten.jinxiancun.mapper.rolesMapper;
import com.ten.jinxiancun.server.rolesServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class rolesServeImpl implements rolesServer {

    @Autowired
    rolesMapper rm;

    @Override
    public List<Map<String, Object>> getAllRolesFind(Map<String, Object> map) {
        return rm.getAllRoles(map);
    }

    @Override
    public Integer getRolesCountFind(Map<String, Object> map) {
        return rm.getRolesCount(map);
    }

    @Override
    public Integer AddRolesFind(Map<String, Object> map) {
        return rm.AddRoles(map);
    }

    @Override
    public Integer UpdateRolesFind(Map<String, Object> map) {
        return rm.UpdateRoles(map);
    }

    @Override
    public Integer DelectRolesFind(Integer id) {
        return rm.DelectRoles(id);
    }

    @Override
    public List<Map<String, Object>> getRolesFind(Map<String, Object> map) {
        return rm.getRoles(map);
    }

    @Override
    public Integer rolesCountFind(Map<String, Object> map) {
        return rm.rolesCount(map);
    }

    /*角色添加模块时获取已有模块*/
    @Override
    public List<Map<String, Object>> getRolesMenuFind(Map<String, Object> map) {
        return rm.getRolesMenu(map);
    }

    @Override
    public Integer addRolesMenuFind(Map<String, Object> map) {
        return rm.addRolesMenu(map);
    }

    @Override
    public Integer deleteRolesMenuFind(Integer menuId, Integer roleId) {
        return rm.deleteRolesMenu(menuId,roleId);
    }
}
